<template>
  <div class="new">
    <h1>{{ msg }}</h1>
    <div class="new_list">
      <ul>
        <li @click="all">全部</li>
        <li @click="travel">旅行</li>
        <li @click="life">生活</li>
      </ul>
    </div>
    <div class="main">
      <main-one :mained="who"></main-one>
    </div>
  </div>
</template>

<script>
import mainOne from "./mainOne"
export default {
  name: 'new',
  data () {
    return {
      msg: 'Welcome to Your Newone',
      who:'all'
    }
  },
  methods:{
    all:function(event){
      return this.who="all";
    },
    travel:function(event){
      return this.who="travel";
    },
    life:function(event){
      return this.who="life";
    },

  },
  components:{
  mainOne
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
